import org.junit.Test;

public class threadWait {





    @Test
    public void $A(){
       new Thread(()-> {
          synchronized (this){
              System.out.println("等待纸巾");
              try {
                  this.wait();
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
              System.out.println("擦完屁股走人");
          }
       }).start();

        new Thread(()-> {
            System.out.println(this);
            synchronized (this){
              this.notify();
            }
        }).start();
    }
}
